window.onload = function() {
    var d = document.createElement("div");
    d.style.position="absolute";
    d.style.top="100px";
    d.style.left="100px";
    d.style.width="100px";
    d.style.height="100px";
    d.style.backgroundColor="magenta";
    document.body.appendChild(d);
}